package kr.hkit.androidcomplete02.ch19;

import kr.hyunist.androidcomplete01.R;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

public class LongTimeEx extends Activity {
	int mValue;
	TextView mText;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.ch19_upload);
		
		mText  = (TextView) findViewById(R.id.ch19_uploadtv);
	}
	
	public void mOnClick(View v){
		mValue = 0;
		Update();
	}

	private void Update() {
		for(int i = 0; i < 100; i++){
			mValue++;
			mText.setText(Integer.toString(mValue));
			try {
				Thread.sleep(50);
			} catch (InterruptedException e) {
				
			}
		}
		
	}
}
